﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EnerForecast
{
    class MathHelper
    {
        static public  double CalculateCubicEquation(double a, double b, double c, double d, double x)
        {
            double result = 0;
            result = a * x * x * x + b * x * x + c * x + d;
            return result;
        }
        static public double Min(double a, double b)
        {
            if (a > b)
            {
                return b;
            }
            else
            {
                return a;
            }
        }
        static public int Min(int a, int b)
        {
            if (a > b)
            {
                return b;
            }
            else
            {
                return a;
            }
        }
    }
}
